package com.lhf.userservice.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhf.userservice.entity.FvsSysUser;
import com.lhf.userservice.vo.FvsSysUserVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (FvsSysUser)表数据库访问层
 *
 * @author liuhf
 * @since 2021-03-29 16:01:43
 */
public interface FvsSysUserDao extends BaseMapper<FvsSysUser> {


    /**
     * 给用户添加角色
     *
     * @param uid
     * @param rids
     * @return
     */
    int addRoleByUid(@Param("uid") Long uid, @Param("rids") List<Long> rids);

    /**
     * 删除用户的角色
     *
     * @param uid
     * @param rids
     * @return
     */
    int delRoleByUid(@Param("uid") Long uid, @Param("rids") List<Long> rids);

    /**
     * 根据用户名查询用户
     *
     * @param username
     * @return
     */
    FvsSysUser findUserByUsername(String username);
}
